package com.android.RssReader.Screen;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.android.RssReader.R;
import com.android.RssReader.Service.ScreenService;
import com.android.RssReader.Service.ServiceManager;

public class ScreenLogin extends Screen{

	private Button loginBtn, registerBtn;
	private final ScreenService screenService;
	
	public ScreenLogin() {
		super(SCREEN_TYPE.SCREEN_LOGIN_T, ScreenLogin.class.getCanonicalName());
		screenService = ServiceManager.getScreenservice();
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_login);
		loginBtn = (Button) findViewById(R.id.login_btn);
		loginBtn.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				screenService.show(ScreenHome.class);
			}});
		registerBtn = (Button) findViewById(R.id.register_btn);
		registerBtn.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
			}});
		try {
			//XmlBuildUtil.postXml("https://219.239.105.29:5222", null);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

}
